import numpy as np
def primes(kmax):
    p=np.zeros(10000)
    result = np.zeros(10000)
    if kmax > 10000:
        kmax = 10000
    k = 0
    n = 2
    j = 0
    while k < kmax:
        i = 0
        while i < k and n % p[i] != 0:
            i = i + 1
        if i == k:
            p[k] = n
            k = k + 1
            result[j] = k
            j += 1
        n = n + 1
    return result
if __name__=="__main__":
    primes(10000)    
    